<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml"
      xmlns="http://www.w3.org/1999/html">

<head>
    <meta content="text/html;charset = utf-8" http-equiv="content-type">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

    <title>采购单列表</title>

    <link href="../lib/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="../lib/jquery/jquery.min.js"></script>
    <script src="../lib/AmazeUI-2.4.2/assets/js/amazeui.js" type="text/javascript"></script>
    <script src="../lib/vue/2.4.2/vue.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../lib/elementui/1.4.3/theme-default/index.css">
    <script src="../home/js/vue.min.js"></script>
    <script src="../lib/elementui/1.4.3/index.js"></script>
    <script src="../common/js/distpicker.data.js"></script>
    <script src="../common/js/distpicker.js"></script>
    <script src="../charge/moment.js"></script>
    <script src="//unpkg.com/vue/dist/vue.js"></script>
    <script src="//unpkg.com/element-ui@2.2.0/lib/index.js"></script>
    <style>

        .el-table .warning-row {
            background: oldlace;
        }

        .el-table .success-row {
            background: #eef1f6;
        }
    </style>
</head>

<body>
<div id="addressManager">
    <div id="address1">
    <h1 align="center">地址管理</h1> <span align="right"><el-button type="primary" @click="addressAdd" style="margin-bottom: 5px;">新增地址</el-button></span></template>
    <template>
        <el-table :data="addressTable.slice((currentPage-1)*pagesize,currentPage*pagesize)" width="100%" style="width: 100%" :row-class-name="tableRowClassName">
            <el-table-column label="默认"  align="center">
                <template slot-scope="scope">
                    <el-checkbox v-model="scope.row.ischeck" disabled>默认地址</el-checkbox>
                </template>
            </el-table-column>
            <el-table-column prop="createTime" :formatter="dateFormat" label="创建时间"  align="center">
            </el-table-column>
            <el-table-column prop="address" label="地址信息"  align="center">
            </el-table-column>
            <el-table-column label="操作" width="355" align="center">
                <template scope="scope">
                    <el-button size="small" type="primary" icon="el-icon-sold-out" @click="checked(scope.$index, scope.row)">设置为默认地址</el-button>
                    <el-button size="small" type="primary" icon="el-icon-sold-out" @click="deleteData(scope.$index, addressTable)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"   :page-sizes="[10, 20, 30, 40]" :current-page.sync="currentPage" :page-size="pagesize" layout="total, prev, pager, next" :total="addressTable.length" align="right" style="right: 50px;top:550px;position: absolute"></el-pagination>
    </template>
    </div>
    <br>
    <div id="address2">
        <h1 align="center">新增地址</h1>
        <div data-toggle="distpicker" id="distpicker" align="center">
            <div class="form-group">
                <select class="form-control select " id="province1"></select>
            </div>
            <div class="form-group">
                <select class="form-control select" id="city1"></select>
            </div>
            <div class="form-group">
                <select class="form-control"  id="district1"></select>
            </div>
        </div>
        <br>
        <el-input v-model="form.address"  placeholder="请输入详细地址信息【例如：街道，门牌……】" auto-complete="off" ></el-input>
        <br>
        <br>

        <div  align="center">
            <el-button @click="certen">取 消</el-button>
            <el-button type="primary" @click="saveaddress">保存</el-button>
        </div>
    </div>
</div>
</body>
<script src="../charge/addressManagerList.js"></script>
<script type="text/javascript" >

    $("#distpicker").distpicker({
        province: '甘肃省',
        city: '张掖市'
    });

</script>
</html>

